package com.briup.smartlabs.web.controller;

import java.util.Date;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.briup.smartlabs.bean.ex.SysLog;
import com.briup.smartlabs.common.utils.Response;
import com.briup.smartlabs.service.SysLogService;
import com.github.pagehelper.PageInfo;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import springfox.documentation.swagger.web.ApiResourceController;

@Api(tags = "系统日志服务")
@RestController
@RequestMapping("/syslog")
public class SysLogController {
    @Autowired
    private SysLogService logService;

    @GetMapping("/by/condition")
    public Response<PageInfo<SysLog>> findByCondition(
            int pageNum,
            int pageSize,
            String key){
        PageInfo<SysLog> pageInfo =
                logService.findByCondition(pageNum, pageSize, key);
        return Response.ok(pageInfo);
    }
}








